<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <input type="button" value="按钮1" v-on:click="f()">
    <input type="button" value="按钮2" @click="f1()">
    <h2>{{info}}</h2>
</div>


<script src="js/vue.js"></script>
<script>
    let v = new Vue({
        el:"div",
        data:{
            info:"事件绑定"
        },

        methods:{
            f(){

                v.info="按钮1绑定了"
            },

            f1:function () {
                v.info="按钮2绑定了"
            }

        }



    })
</script>

</body>
</html>